home *** CD-ROM | disk | FTP | other *** search
- Path: news.primenet.com!wisniew
- From: Joseph Wisniewski <wisniew@primenet.com>
- Newsgroups: comp.lang.c
- Subject: Re: Converting to "FULL" ASCII
- Date: 11 Mar 1996 04:18:01 -0700
- Organization: Primenet (602)395-1010
- Sender: root@primenet.com
- Message-ID: <4i1259$n8g@nnrp1.news.primenet.com>
- References: <4i0prp$tn6@lantana.singnet.com.sg>
- X-Posted-By: wisniew@usr2.primenet.com
-
- Don't know the specific answer to your question, however it probably has
- something to do with signed and unsigned chars. A side note when dealing
- with 8-bit characters however, "if" tests may not work as one would think.
- For example, if you haved loaded an 8-bit character into a "char", the
- following does NOT work as intended:
-
- char Test_Char
-
- if (Test_Char == 0x80)
- ...
-
- with Test_Char having the value x80, this test fails because the x80 sign
- extends out so that you are testing
- FF80 with 0080.
- Solution, typecast the literal as a char or maybe declare Test_Char as
- an unsigned char.
-
- Joe
-
- Charles Lai <se7212079@ntuvax.ntu.ac.sg> wrote:
- : Hi... Does anyone know how to convert an integer 0-255 to its extended
- : ASCII representation?
-
- : toascii only convert up to 127....
-
- : Thanks & Regards
- : ---
- : Charles Lai
- : Who? What? When? Where? Why?
-
-
- --
- Joe Wisniewski
- Commercial Software Solutions, Ltd. -- Embedded/RT SW Consulting
- Co-Author: Program Smarter, Not Harder - Get Mission Critical Projects
- Right the First Time ISBN 0-07-021232-5
-
- wisniew@primenet.com --- The "Baltimore Browns"? Pazhaloosta!
- Ada95 --> She'll take you to places you never thought possible!
-
-